<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>个人"舜e贷"模式贷款审查审批表</title>
    <link rel="stylesheet" href="css/layui.css" media="all"/>
    <script src="js/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="layui.js"></script>
    <script type="text/javascript" src="ag/common/util.js"></script>    
    <style>
        .unLine {
            display: inline-block;
            text-align: center;
        }
    </style>
</head>
<body>
<div id="all" style="padding-bottom:50px">
    <div id="bigTable" align="center">
        <table style="width: 90%;" cellspacing="0" cellpadding="0">
            <thead>
            <tr height="74" style="font-size: 20px;">
                <th colspan="5" style="text-align: center;">个人"舜e贷"模式贷款审查审批表</th>
            </tr>
            </thead>
            <tbody style="font-size: 14px;">
            <!--借款人情况调查-->
            <tr>
                <th style="text-align: center; border: 1px solid black;"
                    rowspan="3">借款人基本信息
                </th>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">客户名称
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="CUST_NAME"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">证件类型
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="ID_TYPE"></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">证件号码
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="ID_NO"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">申请金额(元)
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="APPLY_MONEY"></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">申请期限(月)
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="APPLY_LIMIT"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">货款用途
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="PURPOSE"></td>
            </tr>


            <tr>
                <th style="text-align: center; border: 1px solid black;"
                    rowspan="5">系统测算结果
                </th>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">评级结果
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="grade"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">评级级别
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="pjLmt"></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40"><b>类型</b>
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40"><b>授信额度</b></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40"><b>一年期贷款月利率（‰）</b>
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40"><b>一年期贷款日利率（‱）</b></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">信用
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="creditLimit"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="creditMonRate"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="creditRate"></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">抵（质）押
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="pledgeLimit"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="pledgeMonRate"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="pledgeRate"></td>
            </tr>
            <tr>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40">保证
                </td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="ensureLimit"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="ensureMonRate"></td>
                <td style="text-align: center; border: 1px solid black;"
                    width="100" height="40" id="ensureRate"></td>
            </tr>





            <tr>
                <th style="border-left: 1px solid black; border-top: 1px solid black; vertical-align: middle; text-align: center;" width="100" height='60'>客户经理调查结论</th>

                <td style="padding-bottom: 10px; border: 1px solid black; padding-left: 30px" colspan="4">

                    <!--<br />同意对该客户授信额度为<span id="SURVEY_HIGH_LIMIT" style="text-decoration: underline;" class="unLine"></span>元-->
                    <!--,担保方式为<span id="warrantText" style="text-decoration: underline;" class="unLine"></span> -->
                    <!--,一年期贷款日利率为<span id="oneYearLoanOfDayRate" style="text-decoration: underline;" class="unLine"></span>‱-->
                    <!--,授信期限为<span id="SURVEY_DATE_LIMIT"-->
                    <!--style="text-decoration: underline;" class="unLine"></span>月。<br />-->
                    <!--<br />-->

                    <br/>同意对该客户授信额度为<span id="SURVEY_HIGH_LIMIT" style="text-decoration: underline"></span>元
                    ,担保方式为<span id="warrantText" style="text-decoration: underline"></span>
                    , 利率浮动比例为<span id="rateFloat" style="text-decoration: underline"></span>%
                    , 一年期贷款月利率为<span id="monRate" style="text-decoration: underline"></span>‰
                    ,日息为万分之<span id="dayRate" style="text-decoration: underline"></span>
                    ,（即每万元1天 <span id="moneyForDay" style="text-decoration: underline"></span>元）
                    ,授信期限为<span id="SURVEY_DATE_LIMIT" style="text-decoration: underline"></span>个月。

                    <div style="text-align: center; padding-top: 20px">
                        <span style="float: left;"><b>调查客户经理签字：</b><b id="su_name" style="text-decoration: underline; width: 100px; display: inline-block;"></b></span>
                        <span style="float: right; margin-right: 20px;"><b>调查日期：</b> <b id="su_date" style="text-decoration: underline; width: 80px"></b></span>
                    </div>
                </td>

            </tr>
            <tr>
                <th
                        style="border-left: 1px solid black; border-top: 1px solid black; text-align: center; vertical-align: middle;"
                        width="100" height='40'>审查意见
                </th>
                <td
                        style="padding-bottom: 10px; border: 1px solid black; padding-left: 80px"
                        height="100" colspan="4"><br/>
                    <b></b> <br/>

                    <div style="text-align: right; padding-top: 20px">
                        <span style="float: left;"> <b>审查岗签字：</b> <b id="" style="text-decoration: underline; width: 80px">　　　　　　　　</b></span>
                        <span style="float: right; margin-right: 20px;"><b>审查日期：</b> <b id="" style="text-decoration: underline; width: 80px">　　　　　　　　　</b></span>
                    </div>
                </td>

            </tr>
            <tr>
                <th style="border-left: 1px solid black; border-top: 1px solid black; border-bottom: 1px solid black; text-align: center; vertical-align: middle;" width="100" height='40'>审批意见
                </th>
                <td style="padding-bottom: 10px; border: 1px solid black; padding-left: 80px" height="100" colspan="4">
                    <br/>
                    <br/>
                    <!--   <b><span id="yesOrNo"></span></b><b id="opinion"></b> -->

                    <div style="text-align: right; padding-top: 20px">
                        <span style="float: left;">
							<b>审批岗签字：</b><b id="app_name" style="text-decoration: underline; width: 80px">　　　　　　　　</b>
                        </span>
                        <span style="float: right; margin-right: 20px;"><b>审批日期：</b>
                            <b id="app_date" style="text-decoration: underline; width: 80px">　　　　　　　　</b>
                        </span>
                    </div>
                </td>
            </tr>

            </tbody>
        </table>
    </div>
</div>

<div style="text-align: center;">
   <button class="layui-btn layui-btn-normal" style="margin-top: 20px;" onclick="myprint('bigTable')">打 印</button>
    <!-- <button class="btn btn-primary" style="margin-top: 20px;" onclick="history.go(-1)">返 回</button> -->
</div>

</body>

<script type="text/javascript">
    //打印
    function myprint() {
        var winname = window.open('', 'newwin', '');
        var strHTML = document.getElementById('bigTable').innerHTML;
        winname.document.open('text/html', 'replace');
        winname.document.writeln(strHTML);
        winname.document.execCommand('print'); //打印
        winname.close();
    }
    layui.use(['layedit','element'], function () {
    	var scspId = getUrlParam("scspId")||"";
    	//var stat = getUrlParam('stat')||'';
    	$.ajax({
            type: "get",
            contentType: "application/json",
            url: "/scsp/approval/"+scspId,
            dataType: "json",
            success: function (data) {
                if(data.code == 200){
                    var result = data.data;
                    $("#CUST_NAME").text(result.custName);
                    $("#ID_TYPE").text(result.idType);
                    $("#ID_NO").text(result.idNo);
                    $("#APPLY_MONEY").text(result.applyMoney);
                    $("#APPLY_LIMIT").text(result.applyLimit);
                    $("#PURPOSE").text(result.purpose);

                    $("#grade").text(result.grade);
                    $("#pjLmt").text(result.pjLmt);
                    $("#creditLimit").text(result.creditLimit);
                    $("#creditFloatRate").text(result.creditFloatRate);
                    $("#creditRate").text(result.creditRate);
                    $("#pledgeLimit").text(result.pledgeLimit);
                    $("#pledgeFloatRate").text(result.pledgeFloatRate);
                    $("#pledgeRate").text(result.pledgeRate);
                    $("#ensureLimit").text(result.ensureLimit);
                    $("#ensureFloatRate").text(result.ensureFloatRate);
                    $("#ensureRate").text(result.ensureRate);

                    var creditRate = $("#creditRate").html();
                    var creditMonRate = ((creditRate*30)/10).toFixed(2);
                    $("#creditMonRate").html(creditMonRate);
                    var pledgeRate = $("#pledgeRate").html();
                    var pledgeMonRate = ((pledgeRate*30)/10).toFixed(2);
                    $("#pledgeMonRate").html(pledgeMonRate);
                    var ensureRate = $("#ensureRate").html();
                    var ensureMonRate = ((ensureRate*30)/10).toFixed(2);
                    $("#ensureMonRate").html(ensureMonRate);
					//担保方式查询结果返回判断
                    //$("#warrantText").text("　" + result.warrantType + "　");
                    result.warrantType == null?$("#warrantText").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'):$("#warrantText").text("　" + result.warrantType + "　");
					//授信额度查询返回结果判断
                    result.surveyHighLimit == null?$("#SURVEY_HIGH_LIMIT").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'):$("#SURVEY_HIGH_LIMIT").text("　" + parseFloat(result.surveyHighLimit).toFixed(2) + "　");
                    
                    //$("#oneYearLoanOfDayRate").text("　" + result.DAY_INTEREST + "　");
                    //授信期限查询返回判断
                    //$("#SURVEY_DATE_LIMIT").text("　" + result.surveyDateLimit + "　");
                    result.surveyDateLimit == null?$("#SURVEY_DATE_LIMIT").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'):$("#SURVEY_DATE_LIMIT").text("　" + result.surveyDateLimit + "　");
                    $("#su_name").text("　  " + result.custGrpName + "　　");
                    $("#su_date").text(result.reportDate);
                    /*  $("#app_name").text("　　" + data.result.MA_NAME + "　　");
                     $("#app_date").text(data.result.APPROVAL_DATE); */

                    /*    if (data.result.APPROVAL_OPINION == "01") { //同意
                           if ($.trim(data.result.REASON) == "") {
                               $("#yesOrNo").text("同意。");
                               $("#opinion").text(data.result.REASON);
                           } else {
                               $("#yesOrNo").text("同意，");
                               $("#opinion").text("意见或建议：" + data.result.REASON);
                           }
                       } else {
                           $("#yesOrNo").text("不同意，");
                           $("#opinion").text("意见或建议：" + data.result.REASON);
                       }
        */
                    var baseRate = 4.35 / 100;//基础利率
                    var rateFloat = result.rateFloat;//利率浮动比例
                    var dayRate = ((parseFloat(result.rateFloat) / 100 + 1) * baseRate / 360 * 10000).toFixed(4);
                    var monRate = ((parseFloat(result.rateFloat) / 100 + 1) * baseRate / 12 * 1000).toFixed(4);
                    var moneyForDay = ((parseFloat(result.rateFloat) / 100 + 1) * baseRate / 360 * 10000).toFixed(4);
					//利率浮动比例查询返回判断
                    //$("#rateFloat").text("　  "+parseFloat(rateFloat)+"　  ");
					//rateFloat == null?$("#rateFloat").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'):$("#rateFloat").text("　  "+parseFloat(rateFloat)+"　  ");
                    if(rateFloat == null){
                    	$("#rateFloat").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
                    	$("#dayRate").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
                    	$("#monRate").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
                    	$("#moneyForDay").html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
                    }else{
                    	$("#rateFloat").text("　  "+parseFloat(rateFloat)+"　  ");
                    	$("#dayRate").text("　" + doubleConvertToChineseUppers(parseFloat(dayRate)) + "　");
                        $("#monRate").text("　" + parseFloat(monRate) + "　");
                        $("#moneyForDay").text("　" + parseFloat(moneyForDay) + "　");
                    }
					/* var rateisEmpty = isEmpty(result.rateFloat);
                    $("#dayRate").text(rateisEmpty ? " " : "　" + doubleConvertToChineseUppers(parseFloat(dayRate)) + "　");
                    $("#monRate").text(rateisEmpty ? " " : "　" + parseFloat(monRate) + "　");
                    $("#moneyForDay").text(rateisEmpty ? "" : "　" + parseFloat(moneyForDay) + "　"); */
                }else{
                    layer.msg(data.message);
                }
            }
        });      
    });
</script>

</html>
